home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue64 / WBroker / Unit1.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  2000-10-01  |  974 b   |  44 lines

  1. unit Unit1;
  2.  
  3. interface
  4.  
  5. uses
  6.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  7.   HTTPApp, StdCtrls;
  8.  
  9. type
  10.   TForm1 = class(TForm)
  11.     Memo1: TMemo;
  12.     Button1: TButton;
  13.     PageProducer1: TPageProducer;
  14.     procedure Button1Click(Sender: TObject);
  15.     procedure PageProducer1HTMLTag(Sender: TObject; Tag: TTag;
  16.       const TagString: String; TagParams: TStrings;
  17.       var ReplaceText: String);
  18.   private
  19.     { Private declarations }
  20.   public
  21.     { Public declarations }
  22.   end;
  23.  
  24. var
  25.   Form1: TForm1;
  26.  
  27. implementation
  28.  
  29. {$R *.DFM}
  30.  
  31. procedure TForm1.Button1Click(Sender: TObject);
  32. begin
  33.   Memo1.Text := PageProducer1.Content;
  34. end;
  35.  
  36. procedure TForm1.PageProducer1HTMLTag(Sender: TObject; Tag: TTag;
  37.   const TagString: String; TagParams: TStrings; var ReplaceText: String);
  38. begin
  39.   if CompareText(TagString, 'TestTag') = 0 then
  40.     ReplaceText := 'If you see this the tag substitution is working.';
  41. end;
  42.  
  43. end.
  44.